<?php
class mainModel{
	private $db;
	private $ecs;
	public function __construct(){
		$this->db = $GLOBALS['db'];
		$this->ecs = $GLOBALS['ecs'];
	}
	public function get_main_info(){
		$sql="SELECT * FROM ".$this->ecs->table('ad')." WHERE ad_id=4 AND position_id=3 LIMIT 1";
		$background = $this->db->getRow($sql);
		$sql="SELECT * FROM ".$this->ecs->table('ad')." WHERE ad_id=5 AND position_id=3 LIMIT 1";
		$top = $this->db->getRow($sql);
		$result['background'] = $background;
		$result['top'] = $top;
		return $result;
	}
}